﻿using DG.Tweening;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UIBattlePlayerDiceItem : UIObject
{
    public GameObject[] dots;
    public Vector3 rotateVec = new Vector3(0, 0, 0);
    public void SetDiceType(DiceType diceType)
    {
        int diceTypeInt = (int)diceType;
        for (int i = (int)DiceType.One; i <= (int)DiceType.Six; i++)
        {
            dots[i].SetActive(i == diceTypeInt);
        }
        //随意一个旋转
        rotateVec.z = Random.Range(0.0f, 360.0f);
        this.transform.localEulerAngles = rotateVec;
    }
}
